import Game.*;
import Caretaker.*;
public class Main {
    public static void main(String[] args) {
        Piece piece = new Piece("黑棋子", 2, 3);
        Caretaker caretaker = new Caretaker();
        System.out.println("当前棋子信息: " + piece.getName() + " 位于: (" + piece.getPosX() + ", " + piece.getPosY() + ")");
        caretaker.setMemento(piece.createMemento());
        piece.setPosX(3);
        piece.setPosY(10);
        System.out.println("当前棋子信息: " + piece.getName() + " 位于: (" + piece.getPosX() + ", " + piece.getPosY() + ")");
        piece.restoreFromMemento(caretaker.getMemento());
        System.out.println("当前棋子信息: " + piece.getName() + " 位于: (" + piece.getPosX() + ", " + piece.getPosY() + ")");
    }
}